package com.furnitur.modules.admin.controller.statistics;

import com.furnitur.common.api.CommonResult;
import com.furnitur.modules.admin.dto.statistics.OrderStatisticsDTO;
import com.furnitur.modules.admin.vo.statistics.OrderStatisticsVO;
import com.furnitur.modules.admin.service.statistics.OrderStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/order/statistics")
public class OrderStatisticsController {

    @Autowired
    private OrderStatisticsService orderStatisticsService;

    @GetMapping("/overview")
    public CommonResult<OrderStatisticsVO> getOverview(OrderStatisticsDTO dto) {
        OrderStatisticsVO statistics = orderStatisticsService.getStatistics(dto);
        return CommonResult.success(statistics);
    }
} 